<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>H5 瀑布流</title>
    <style>
        .lists {
            padding: 20px;
            box-sizing: border-box;
            column-count: 2;
            column-gap: 10px;
        }

        .item {
            break-inside: avoid;
            width: auto;
            height: 200px;
            background-color: #eee;
            line-height: 200px;
            text-align: center;
            margin-bottom: 10px;
        }

        .lists .item:nth-child(2n+1) {
            height: 240px;
        }

        .lists .item:nth-child(3n+1) {
            height: 320px;
        }

        .lists .item:nth-child(1) {
            background: linear-gradient(135deg, #ffcc00, #ff9900);
        }

        .lists .item:nth-child(2) {
            background: linear-gradient(135deg, #ff6666, #ff3333);
        }

        .lists .item:nth-child(3) {
            background: linear-gradient(135deg, #66ccff, #3399ff);
        }

        .lists .item:nth-child(4) {
            background: linear-gradient(135deg, #ccff66, #99ff33);
        }

        .lists .item:nth-child(5) {
            background: linear-gradient(135deg, #ffccff, #ff99cc);
        }

        .lists .item:nth-child(6) {
            background: linear-gradient(135deg, #ccffcc, #99ff99);
        }

        .lists .item:nth-child(7) {
            background: linear-gradient(135deg, #ffcc99, #ff9966);
        }

        .lists .item:nth-child(8) {
            background: linear-gradient(135deg, #ccccff, #9999ff);
        }

        .lists .item:nth-child(9) {
            background: linear-gradient(135deg, #ffcccc, #ff9999);
        }

        .lists .item:nth-child(10) {
            background: linear-gradient(135deg, #ccffcc, #99ff99);
        }

        .lists .item:nth-child(11) {
            background: linear-gradient(135deg, #ffcc99, #ff9966);
        }

        .lists .item:nth-child(12) {
            background: linear-gradient(135deg, #ccccff, #9999ff);
        }

        .lists .item:nth-child(13) {
            background: linear-gradient(135deg, #ffcccc, #ff9999);
        }

        .lists .item:nth-child(14) {
            background: linear-gradient(135deg, #ccffcc, #99ff99);
        }

        .lists .item:nth-child(15) {
            background: linear-gradient(135deg, #ffcc99, #ff9966);
        }
    </style>
</head>

<body>
    <div class="lists">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
        <div class="item">5</div>
        <div class="item">6</div>
        <div class="item">7</div>
        <div class="item">8</div>
        <div class="item">9</div>
        <div class="item">10</div>
        <div class="item">11</div>
        <div class="item">12</div>
        <div class="item">13</div>
        <div class="item">14</div>
        <div class="item">15</div>
    </div>
</body>

</html>